package com.jyw.business.ast.domain.dto.web;

import com.jyw.business.ast.domain.AstConsumable;
import com.jyw.common.constant.Constants;
import com.jyw.common.utils.DateUtils;
import com.jyw.common.utils.SecurityUtils;
import com.jyw.common.utils.bean.BeanUtils;
import com.jyw.system.domain.vo.SimpleFileVo;
import com.jyw.system.utils.FileUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.math.BigDecimal;
import java.util.List;

@Data
@ApiModel("耗材信息编辑-请求实体")
public class AstConsumableEditDto extends AstConsumableSignDto{

    @ApiModelProperty("id")
    private Long id;

    @Override
    public AstConsumable buildAstConsumable(){
        AstConsumable consumable = new AstConsumable();
        BeanUtils.copyProperties(this,consumable);
        consumable.setEnclosureId(FileUtils.fileToId(getEnclosure()));
        return consumable;
    }
}
